package day04;

import java.security.spec.RSAOtherPrimeInfo;

public class ForDemo {
    public static void main(String[] args) {
         for (int num=1;num<=9;num++){
             System.out.println(num+"*9="+num*9);
         }
         for (int num=1;num<=9;num+=2){
             System.out.println(num+"*9="+num*9);
         }
         for (int num=9;num>=1;num--){
             System.out.println(num+"*9="+num*9);
         }
         /*
         num=9 true 输出 num=num-1
         num=8 true --- num=num-1
         -------
         num=1 true 输出 num=num-1
         num=0 false 结束
          */
        for (int times=0;times<5;times++){
            System.out.println("行动是成功的阶梯");
        }
        System.out.println("-------------");
        //1-100
        int sum = 0;
        for (int i=1;i<=100;i++){
            sum = sum+i;
        }
        System.out.println("1+...+100="+sum);
        /*
        sum=0 i=1 sum=0+1 i=i+1
        sum=1 i=2 sum=1+2 i=i+1
        sum=3 i=3 sum=1+2+3 i=i+1
        -----------
        sum=- i=99 sum=1+2+--+99 i=i+1
        sum=- i=100 sum=1+2+--+100 i=i+1
        sum=5050 i=101 结束
         */
    }
}
